<template>
  <div>
    <ul v-for="i in list" :key="i">
      <li>{{ i.name }}
        {{ i.score }}
        <button>兑换</button>
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "goods_list",
  data() {
    return {
      list: {}
    }
  },
  methods:{
    get_goods(){
      axios.get('http://127.0.0.1:5000/post_goods')
          .then(res=>{
            this.list = res.data.list
          })
    }
  },
  mounted() {
    this.get_goods()
  }
}
</script>

<style scoped>

</style>
